package com.example.littleken.recyclerviewtext;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import com.example.littleken.recyclerviewtext.Activitys.GridRecyclerViewActivity;
import com.example.littleken.recyclerviewtext.Activitys.HorRecyclerViewActivity;
import com.example.littleken.recyclerviewtext.Activitys.LinearRecyclerViewActivity;
import com.example.littleken.recyclerviewtext.Activitys.puRecyclerViewActivity;

public class MainActivity extends AppCompatActivity {
    private Button btn_linear;
    private Button btn_hor;
    private Button btn_grid;
    private Button btn_pu;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        btn_linear = (Button) findViewById(R.id.btn_linear);
        btn_linear.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this,LinearRecyclerViewActivity.class);
                startActivity(intent);
            }
        });
        btn_hor = (Button) findViewById(R.id.btn_hor);
        btn_hor.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this,HorRecyclerViewActivity.class));
            }
        });
        btn_grid = (Button) findViewById(R.id.btn_grid);
        btn_grid.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this, GridRecyclerViewActivity.class));
            }
        });
        btn_pu = (Button) findViewById(R.id.btn_pu);
        btn_pu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this, puRecyclerViewActivity.class));
            }
        });
    }
}
